package com.yuan.controller;

import com.yuan.service.AsyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 线程池测试类
 * @Author yuan
 * @Date 2021/5/31 10:15
*/
@RestController
@RequestMapping("/thread")
public class ThreadPoolController {
    @Autowired
    private AsyncService asyncService;

    /**
     * 异步线程调用
     */
    @GetMapping("/async")
    public void async(){
        asyncService.executeAsync();
    }
}
